#1.条件判断
#a = 2
#if a<1:
#	print("a比1小")
#elif a==2:
#	print("a等于2")
#else:
#	print("a比1大")
# a = input("请输入一个数字")
# a = int(a)
# if a%2 ==1:
	# print("是奇数")
# else:
    # print("是偶数")
# a = input("请输入一个数字")
# a = int(a)
# if a > 1:
	# print("我比一大")
# elif a == 1:
	# print("我等于一")
# else:
	# print("我比一小")

#2.循环
#①for  in 循环
names = ['a','b','c'];
for name in names:
	print(name)
#计算1-100的整数和
sum =0
#range()  生成一个整数序列，再通过list()函数可以转换为list数据类型。比如range(5)生成的序列是从0开始小于5的整数 list(range(5))[0, 1, 2, 3, 4]
for x in range(101):
	sum = sum+x
print(sum)
#②while循环
#计算一百以内的基数和
sum = 0
n = 99
while n > 0 :
	sum +=n
	n-=2
print(sum)
